﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'usp_UPDMS_SYS_SP_LOG_Insert')
	BEGIN
		DROP Procedure usp_UPDMS_SYS_SP_LOG_Insert
	END
GO

SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
GO
/******************************************************************************
**	Name : usp_UPDMS_SYS_SP_LOG_Insert
**	Desc : SP 호출시 파라미터를 로그에 Insert한다.
**	Test Exec Query : Exec usp_UPDMS_SYS_SP_LOG_Insert
**	Called by : another SP
**	Program ID : -
**	Auth : 송시명
**	Date : 2014-09-02
*******************************************************************************
**	Change History
*******************************************************************************
**	Date:		Author:		Description:
**	--------	--------	---------------------------------------
**	
*******************************************************************************/
CREATE PROC [dbo].[usp_UPDMS_SYS_SP_LOG_Insert]
@Pgm_Id nvarchar(20),
@Activity_Id int,
@Sp_Nm nvarchar(100),
@Parameter nvarchar(max),
@Ext_Log1 nvarchar(max),
@Ext_Log2 nvarchar(max),
@Ext_Log3 nvarchar(max),
@Create_User nvarchar(20)
AS
SET NOCOUNT OFF

INSERT INTO UPDMS_SYS_SP_LOG (
       Pgm_Id,
       Activity_Id,
       Sp_Nm,
       Parameter,
       Ext_Log1,
       Ext_Log2,
       Ext_Log3,
       Create_User,
       Create_Dt
)
VALUES (
       @Pgm_Id,
       @Activity_Id,
       @Sp_Nm,
       @Parameter,
       @Ext_Log1,
       @Ext_Log2,
       @Ext_Log3,
       @Create_User,
       GETDATE()
)

GO